import {get} from '/@/utils/http/axios';
import {AUTHORIZATION} from "/@/store/constants";

enum URL {
    // 操作日志接口
    queryOperationLogList = '/api/system/operationLog',
    queryErrorLogList = '/api/system/errorLog',
}

const token =  localStorage.getItem(AUTHORIZATION);

export interface LoginData {
    username: string;
    password: string;
}

const queryOperationListApi = async (params: any) => get<any>({
    url: URL.queryOperationLogList, params: params, data: {},
    headers: {
        'Authorization': `Bearer ${token}`
    }
});

const queryErrorLogListApi = async (params: any) => get<any>({
    url: URL.queryErrorLogList, params: params, data: {},
    headers: {
        'Authorization': `Bearer ${token}`
    }
});


export {
    queryOperationListApi,
    queryErrorLogListApi
};
